package definite.Guide.Book.Chap01_02;

import java.awt.Component;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;

public class MouseFocusMover extends MouseAdapter {
	@Override
	public void mouseEntered(MouseEvent e) {

		Component component = e.getComponent();
		if (!component.hasFocus())
			component.requestFocusInWindow();
	}
}
